import api from '../index.js';

var login = {};

// 微信登录
login.wxLogin = function(data) {
	return new Promise((resolve, reject) => {
		api.post(api.url.Login, data,
			(response) => {
				if (response.msg = "ok") {
					var res = response;
					resolve(res);
				} else {
					reject(response);
				}
			})
	})
}

module.exports = login;
